package com.gimi.cloud.jimi.dao.dao.order;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.gimi.cloud.jimi.dao.myMapper.MyMapper;
import com.gimi.cloud.jimi.dto.order.OrderLogisticsDTO;
import com.gimi.cloud.jimi.entity.order.OrderLogisticsEntity;

/**
 * Created by shazhiwei on 2017/12/27.
 */
public interface OrderLogisticsDao extends MyMapper<OrderLogisticsEntity>{

	@Update("UPDATE sh_order_logistics SET is_delete = 1 WHERE o_id = #{oId}")
	int deleteByOrderId(@Param(value = "oId")Integer oId);
	
	@Select("SELECT * FROM sh_order_logistics WHERE is_delete = 0 AND o_id = #{oId}")
	List<OrderLogisticsDTO> selectOrderLogisticByOrder(@Param(value = "oId") Integer oId);
	
	

}
